﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;

namespace WindowsFormsApplication2
{
    public partial class DodajPgrzeb : Form
    {
        Form2 F;
        public DodajPgrzeb(Form2 F)
        {
            InitializeComponent();
            this.F = F;
        }

        private void DodajPgrzeb_Load(object sender, EventArgs e)
        {

        }

        private void button1_Click(object sender, EventArgs e)
        {

            string wyn = "insert into zgony (Rok, Numer, Id, Miejsce_Zgonu, Data_Zgonu, Data_Pogrzebu, Ks) ";
            wyn += " values (";
            wyn += textBox1.Text + ", ";
            wyn += textBox2.Text + ", ";
            wyn += textBox3.Text + ", ";
            wyn += "\'" + textBox4.Text + "\', ";
            wyn += "\'" + textBox5.Text + "\', ";
            wyn += "\'"+textBox6.Text + "\', ";
            wyn += textBox7.Text + "); ";
            BazaDaych.Wykonaj(wyn);
            F.pokazwszystko();
            this.Close();
        }
    }
}
